



foreach var of varlist hkecon_satis fam_satis famfuture_satis mobility_satis gov_satis good_demo import_hardwork import_ambition import_edu import_fam import_network import_race import_religion import_gender  {
						asdoc ttest `var' if birthplace!=3 , by( getsth) rowappend
						}

foreach var of varlist hkecon_satis fam_satis famfuture_satis mobility_satis gov_satis good_demo import_hardwork import_ambition import_edu import_fam import_network import_race import_religion import_gender  {
						asdoc ttest `var' if birthplace!=3 , by(compare) rowappend
						}
					
						
					

						
						
						
**Figure A1

*install rdrobust package. For more details: https://rdpackages.github.io/rdrobust/

net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata) replace

rdplot import_race group_discon2 if check!=1 & birthplace!=3, ci(95) c(8.5) p(2)

rdplot import_fam group_discon2 if check!=1 & birthplace!=3, ci(95) c(8.5) p(2)

rdplot import_network group_discon2 if check!=1 & birthplace!=3, ci(95) c(8.5) p(2)

rdplot import_hardwork group_discon2 if check!=1 & birthplace!=3, ci(95) c(8.5) p(2)
